//
//  NetWorkAPI.h
//  BSOrange
//
//  Created by kenshin on 14-8-4.
//  Copyright (c) 2014年 BazzarEntertainment. All rights reserved.
//


#define kNetWorkTimeOutGet 20
#define kNetWorkTimeOutPost 100

//网络状态返回码,按需定义
typedef enum
{
    BSNetSucceed            = 100,              //请求成功
    BSNetFailed             = 101,              //请求失败
    BSNetNotLogin          = 100101,           //需要重新登录
    
}BSNetStatusCode;

typedef enum
{
    BSNetErrorCodeJSONError = 10001              //json解析失败
    
}BSNetErrorCode;

//操作系统平台
typedef enum
{
    BSWeb            = 0,
    BSAndroid        = 1,
    BSIOS            = 3,
    BSWindowsPhone   = 4
} BSOSPlatform;

//成功失败Blocks
typedef void (^BSFinishedBlock) (NSDictionary *data);
typedef void (^BSFailedBlock)   (NSString *error);

typedef void (^BSNetSuccess) (id data, BOOL isCache);
typedef void (^BSNetFailure) (NSError *error, BOOL isCache);
//(void (^)(NSArray *list, BOOL isCache))

typedef void (^BSContentBlock) (id *data);

//加载更多和更新数据
typedef void (^BSLoadMoreDataBlock) (void);
typedef void (^BSUpdateDataBlock)   (void);

